web3.js@0.2x.x web3.toBigNumber
web3.toBigNumber(numberOrHexString)
ζ°ε€γ BigNumber γ«ε€ζγγΎγγ
γγ©γ‘γΌγΏ
1. Number|String
ζ°ε€γζ°ε€γ葨γζεεγγΎγγ―ζ°ε€γ葨γ16ι²ζ°ζεε
ζ»γε€
BigNumber
γ΅γ³γγ«γ³γΌγ
code:example.js
var value = web3.toBigNumber('200000000000000000000001');
console.log(value); // instanceOf BigNumber
console.log(value.toNumber()); // 2.0000000000000002e+23
console.log(value.toString(10)); // '200000000000000000000001'
εθ